package com.mabs.ground.server.rest.user;

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.mabs.ground.core.DataResponse;
import com.mabs.ground.core.user.entity.User;

/**
 * 
 * @author <a href="Email: mohamedarbi.benslimane@allence-tunisie.com">Ben
 *         Slimane Arbi</a>
 * @version 1.0
 * @since 1.0 - 26 juil. 2014 - 04:36:05
 */
@Path("/user")
public class UserRestService {
	// @Inject
	// public UserRestService(UserService service) {
	// super(service);
	// }
	@POST
	@Path("/{id}")
	@Produces(MediaType.APPLICATION_JSON)
	public DataResponse<User> get(@PathParam("id") String id) {
		// return service.find(id);//new DataResponse<M>(service.findAll(0,
		// 1000));
		System.out.println("server");
		User user = new User();
		user.setUserId(new Long(id));
		List<User> us = new ArrayList<User>();
		us.add(user);
		DataResponse<User> resp = new DataResponse<User>();
		resp.setData(us);
		return resp;
	}

}
